aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/reset/[code]/+page.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(app)/reset/[code]/+page.svelte')
-rw-r--r--src/routes/(app)/reset/[code]/+page.svelte29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/routes/(app)/reset/[code]/+page.svelte b/src/routes/(app)/reset/[code]/+page.svelte
index 93fdf8f9..deade18a 100644
--- a/src/routes/(app)/reset/[code]/+page.svelte
+++ b/src/routes/(app)/reset/[code]/+page.svelte
@@ -19,8 +19,7 @@
onMount(() => {
if (!isTor && recaptchaSiteKey) {
let s = document.createElement("script");
- s.src =
- "https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey;
+ s.src = "https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey;
document.head.appendChild(s);
}
});
@@ -28,13 +27,9 @@
const getRecaptchaToken = () =>
new Promise((resolve, reject) => {
if (isTor) return resolve("");
- if (!browser || !grecaptcha)
- return reject(new Error("captcha unavailable"));
+ if (!browser || !grecaptcha) return reject(new Error("captcha unavailable"));
grecaptcha.ready(() => {
- grecaptcha
- .execute(recaptchaSiteKey, { action: "reset" })
- .then(resolve)
- .catch(reject);
+ grecaptcha.execute(recaptchaSiteKey, { action: "reset" }).then(resolve).catch(reject);
});
});
@@ -59,9 +54,7 @@
}
const scriptSelector =
- "script[src='https://www.google.com/recaptcha/api.js?render=" +
- recaptchaSiteKey +
- "']";
+ "script[src='https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey + "']";
const script = document.querySelector(scriptSelector);
if (script) {
script.remove();
@@ -77,9 +70,7 @@
</div>
<div class="flex justify-center items-center">
- <div
- class="shadow-xl rounded-3xl p-10 pb-12 space-y-5 w-full mx-5 md:mx-0 md:w-[400px]"
- >
+ <div class="shadow-xl rounded-3xl p-10 pb-12 space-y-5 w-full mx-5 md:mx-0 md:w-[400px]">
<h1 class="text-2xl font-bold text-center">{$t("login.reset")}</h1>
{#if form?.error}
@@ -90,15 +81,11 @@
<form class="space-y-5" method="POST" onsubmit={handleSubmit}>
<input type="hidden" name="recaptcha" value={recaptchaToken} />
- <PasswordInput
- bind:value={$password}
- placeholder={$t("login.password")}
- />
+ <PasswordInput bind:value={$password} placeholder={$t("login.password")} />
<div class="text-secondary">
- A new seed phrase will be generated for your account. You'll need to
- import your old seed phrase if you want to use the same nostr profile
- and savings account as before.
+ A new seed phrase will be generated for your account. You'll need to import your old seed
+ phrase if you want to use the same nostr profile and savings account as before.
</div>
<button